<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			div {
				width: 100px;
				height: 100px;
				position: relative;
				background-color: green;
				/* 动画名称 完成时间 播放次数 */
				animation: myAn2 2s infinite;
			}

			@keyframes myAn2 {
				0% {
					left: 0px;
					top: 0px;
				}

				25% {
					left: 200px;
					top: 0px;
				}

				50% {
					left: 200px;
					top: 200px;
				}

				75% {
					left: 0px;
					top: 200px;
				}

				100% {
					left: 0px;
					top: 0px;
				}
			}

			/* 定义动画 */
			@keyframes myAn {
				from {
					background-color: orange;
				}

				to {
					background-color: yellowgreen;
				}
			}
		</style>
	</head>
	<body>
		<div></div>
	</body>
</html>
